package com.settlement.system.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.settlement.system.common.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
        import java.math.BigDecimal;
        import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
* <p>
* 百盛退货单表
* </p>
*
* @author huangrensen
* @since 2024-09-06
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BsOmsReturnOrder extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
    * ID
    */
    private String id;


    /**
    * 店铺ID
    */
    private String storeCode;
    @TableField(exist = false)
    private String storeName;


    /**
    * 售后单号
    */
    private String asId;


    /**
    * 内部订单号
    */
    private String oId;

    /**
     * 售后类型
     */
    private String orderType;


    /**
    * 线上申请金额
    */
    private BigDecimal buyerApplyRefund = BigDecimal.ZERO;


    /**
    * 线上退运费
    */
    private BigDecimal shopFreight = BigDecimal.ZERO;


    /**
    * 优惠/差额
    */
    private BigDecimal freeAmount = BigDecimal.ZERO;


    /**
    * 卖家应退金额
    */
    private BigDecimal refund = BigDecimal.ZERO;


    /**
    * 买家应补偿金额
    */
    private BigDecimal payment = BigDecimal.ZERO;


    /**
    * 实际应退金额
    */
    private BigDecimal actBackAmount = BigDecimal.ZERO;


    /**
    * 商品应退金额
    */
    private BigDecimal goodsBackAmount = BigDecimal.ZERO;


    /**
    * 换货金额
    */
    private BigDecimal transferAmount = BigDecimal.ZERO;


    /**
    * 卖家应补
    */
    private BigDecimal urefund = BigDecimal.ZERO;


    /**
    * 线上订单号
    */
    private String soId;


    /**
    * 状态
    */
    private String status;


    /**
    * 货物状态
    */
    private String goodStatus;


    /**
    * 最后确认日期
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime confirmDate;


    /**
    * 登记时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime created;


    /**
    * 申请日期
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime asDate;

    @TableField(exist = false)
    private List<BsOmsReturnOrderDetail> detailList;

}
